Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: contract to pay someone #11

Merged
merged 20 commits into from
Mar 12, 2024
Merged

feat: contract to pay someone #11

merged 20 commits into from
Mar 12, 2024

Conversation

dckc
Copy link
Member

@dckc dckc commented Feb 21, 2024

refs

DRAFT (FYI @LuqiPan @Chris-Hibbert ) until:

mostly verbatim port of https://github.com/agoric-labs/ag-power-tools/blob/dc-launchpad/contract/test/test-postalSvc.js

};

const publicFacet = Far('postalSvc', {
lookup: (...path) => E(namesByAddress).lookup(...path),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is this on the publicFacet? Is it part of the postalService purpose to make that available?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes; it's intended for use by other contracts: rather than taking namesByAddress as a term or privateArg, they can take the postalService instance

contract/src/start-postalSvc.js Outdated Show resolved Hide resolved
contract/test/market-actors.js Show resolved Hide resolved
contract/test/market-actors.js Show resolved Hide resolved
@dckc dckc mentioned this pull request Feb 23, 2024
3 tasks
@dckc dckc force-pushed the dc-swap-contract branch from 3d6685e to 7e5d975 Compare March 1, 2024 23:40
@dckc dckc force-pushed the dc-pay-contract branch 9 times, most recently from fc97a69 to 5172ccd Compare March 5, 2024 06:13
@dckc dckc requested a review from Chris-Hibbert March 5, 2024 06:22
Copy link
Contributor

@Chris-Hibbert Chris-Hibbert left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I didn't completely get the test infrastructure.

Why are batchQuery, makeHttpClient, marshalTables, and queryKit needed? Should they be someplace more general so other dApps can use them?

contract/src/postal-service.contract.js Outdated Show resolved Hide resolved
} = postalPowers;
const {
// separate line for bundling
bundleID = Fail`no bundleID`,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why? What does this do when passed to installBundleID()?

Why does bundllng want separate lines?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The design in #16 is that there are 2 cases:

  1. in an ava tests, the caller supplies the bundleID in the config arg.
  2. for deployment, this line gets replaced by bundleID = ${JSON.stringify(b1-${bundle.endoZipBase64Sha512})},. See configureBundleID

For this PR, I punted the comment.

/**
* @file core eval script* to start the postalService contract.
*
* * see rollup.config.mjs to make a script from this file.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Where is rollup.config.mjs?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oops... . good catch... it's in..

I have a stack of PRs, and I keep changing my mind about what goes in which layer.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I punted this note, along with batchQuery, makeHttpClient, marshalTables, and queryKit to #16.

A couple parts of queryKit belong here; they're in name-service-client.js.

contract/test/test-postalSvc.js Outdated Show resolved Hide resolved
contract/test/test-postalSvc.js Outdated Show resolved Hide resolved
contract/test/ui-kit-goals/batchQuery.js Outdated Show resolved Hide resolved
@dckc dckc marked this pull request as ready for review March 5, 2024 20:00
@dckc dckc force-pushed the dc-pay-contract branch 2 times, most recently from 64cc33d to 06a2402 Compare March 5, 2024 22:28
@dckc dckc requested a review from Chris-Hibbert March 5, 2024 22:32
@dckc dckc force-pushed the dc-swap-contract branch from 4ca2292 to 7028fce Compare March 12, 2024 19:22
@dckc dckc changed the base branch from dc-swap-contract to main March 12, 2024 19:26
@dckc dckc force-pushed the dc-pay-contract branch from 751f6c0 to 5b400d9 Compare March 12, 2024 19:30
dckc and others added 18 commits March 12, 2024 14:32
 - not deprecated
 - permit tweak, handle undefined config
 - ATOM not available from consume.issuer
 - move type burden to callee
 - chore: purseNotifer -> purseUpdates
 - chore: prune starter, launcher actors
 - getPayoutAmounts
 - test: contract instance is available
 - separate tests for runCoreEval etc.
 - start using CapData across vats
 - makeNameProxy for A.brand.ATOM
   - refactor agoricNames
 - real addresses
 - move initial balances into provisionSmartWallet,
   since we can't access ERTP mints in the e2e case
 - concise dockerExec
 - t.log for bundles, core eval
 - WIP: leave CapData to another level

WIP: revert e2e postalSvc testing
Co-authored-by: Chris Hibbert <[email protected]>
@dckc dckc force-pushed the dc-pay-contract branch from 5b400d9 to 5e0fa9a Compare March 12, 2024 19:32
@dckc dckc merged commit 26412c4 into main Mar 12, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants